package cn.gcc.learningTime.controller;

import cn.gcc.learningTime.dao.IndexMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 你皓哥靓号
 * @version 1.0
 * @title learningTime
 * @description //TODO
 * @date 2021/2/6 22:30 星期六
 */
@RestController
public class Indexcontroller {
    @Autowired
    private IndexMapper indexMapper;

//  学生总数
    @GetMapping("user_num/student")
    public int getUser_student(){
        int indexNums=indexMapper.getUser_student_num();
        return indexNums;
    }

//  管理员总数
    @GetMapping("user_num/user")
    public int getUser_user(){
        int indexNums=indexMapper.getUser_user_num();
        return indexNums;
    }

//  活动统计
    @GetMapping("event/num")
    public int getevent_num(){
        int indexNums=indexMapper.getEvent_num();
        return indexNums;
    }
}
